package com.atguigu.common.valid;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @FileName ListValue
 * @Description
 * @Author msh
 * @date 2025-10-18
 **/
@Documented
@Constraint(validatedBy = {ListValueConstraintValidator.class})// 这里指定了自定义的校验器,可以指定多个来适配不同的数据类型
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE})
@Retention(RetentionPolicy.RUNTIME)
public @interface ListValue {
    String message() default "{com.atguigu.common.valid.ListValue.message}";//配置文件中配置了默认的提示信息

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};


    int[] vals() default {};
}
